<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>

  <body>
    <div id="app">
      <span v-if="isUser">
        <label for="uname">用户账号</label>
        <input type="text" id="uname" placeholder="用户账号" />
      </span>
      <span v-else>
        <label for="email">邮箱账号</label>
        <input type="email" id="email" placeholder="邮箱账号" />
      </span>
      <button @click="isUser = !isUser">切换类型</button>
    </div>

    <script src="../js/vue.js"></script>
    <script>
      const app = new Vue({
        el: '#app',
        data: {
          isUser: true
        }
      })
    </script>
  </body>
</html>
